import { createRouter , createWebHashHistory }from'vue-router'


const routes =[
    // {
    //     path:'',
    //     component: ()=> import(''),
    //     redirect: '/chilren'
    //        children:[
    //             {
    //                path:'',
    //                component:''
    //              }
    //        ]
    // }
    {
        path : '/404',
        component : ()=> import('../view/errxr/Errxr404.vue')
    },
    {
        path: '/home',
        component : ()=> import('../view/index/home.vue'),
        children:[]
    },
    {
        path: '/login',
        component : ()=> import('../view/authentication/login/login.vue'),
    },
    {
        path:'/:pathMatcher(.*)*',//默认跳转
        redirect: '/404'
    }
]
// 导出 一个VueRotuer实例(对象)
const routerx = createRouter({
    history : createWebHashHistory(), //路径格式
    routes : routes //路由数组
})

export default routerx